import request from '@/utils/request'

// 查询预约咨询列表
export function listConsulting(query) {
  return request({
    url: '/portal/consulting/list',
    method: 'get',
    params: query
  })
}

// 查询预约咨询详细
export function getConsulting(id) {
  return request({
    url: '/portal/consulting/' + id,
    method: 'get'
  })
}

// 新增预约咨询
export function addConsulting(data) {
  return request({
    url: '/portal/consulting',
    method: 'post',
    data: data
  })
}

// 修改预约咨询
export function updateConsulting(data) {
  return request({
    url: '/portal/consulting',
    method: 'put',
    data: data
  })
}

// 同步预约咨询
export function syncConsulting(data) {
  return request({
    url: '/portal/consulting/sync',
    method: 'put',
    data: data
  })
}

// 删除预约咨询
export function delConsulting(id) {
  return request({
    url: '/portal/consulting/' + id,
    method: 'delete'
  })
}
